import request from "@/utils/request";


export function addPolicy(data) {
  return request({
    url: "/api/policy/add",
    method: "post",
    data,
  });
}

export function updatePolicy(data) {
  return request({
    url: "/api/policy/update",
    method: "post",
    data,
  });
}

export function reqPolicyInfo(pageNo,pageSize){
  return request({
    url:`/api/policy/info?pageNo=${pageNo}&pageSize=${pageSize}`,
    method:"get"
  })
}

export function delPolicy(data) {
  return request({
    url: `/api/policy/remove`,
    method: "post",
    data
  });
}

export function delBatchPolicy(data) {
  return request({
    url: "/api/policy/delBatch",
    method: "post",
    data,
  });
}

export function searchPolicy(title){
  return request({
    url: `/api/policy/search?title=${title}`,
    method: "get",
  });
}